package com.zhen.service;

import com.zhen.dao.UserMapper;
import com.zhen.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public User queryUserByUsernameAndPassword(String username, String password) {
        return userMapper.queryUserByUsernameAndPassword(username, password);
    }

    @Override
    public int addUser(String username, String password, String name) {
        return userMapper.addUser(username,password,name);
    }
}
